﻿using System;
using Atomic.Common;
using Atomic.Db;
using Atomic.Permission.Entities;
using System.Collections.Generic;
using System.Linq.Expressions;
namespace Atomic.Permission
{
    public interface IFunPoint : IError
    {
        //List<FunPointEntity> GetList(Expression<Func<FunPointEntity, bool>> predicate);

        /// <summary>
        /// 更新操作点
        /// </summary>
        /// <param name="entity">操作点信息</param>
        /// <param name="id">操作点ID</param>
        bool Update(FunPointEntity entity, int id);

        /// <summary>
        /// 添加新功能操作点
        /// </summary>
        /// <param name="entity">操作点信息</param>
        /// <returns>是否添加成功</returns>
        bool Add(FunPointEntity entity);

        /// <summary>
        /// 删除指定功能点
        /// </summary>
        /// <param name="id">功能点ID</param>
        /// <returns>是否删除成功</returns>
        bool Remove(int id);
                
        /// <summary>
        /// 条件查询列表
        /// </summary>
        /// <param name="predicate">查询条件</param>
        List<FunPointEntity> GetList(Expression<Func<FunPointEntity, bool>> predicate = null);
    }
}
